package com.icinfo.cloud.provider.punish.service.impl;

import cn.hutool.core.util.StrUtil;
import com.icinfo.cloud.provider.common.exception.BusinessException;
import com.icinfo.cloud.provider.punish.mapper.CasePartiesPersonInfoMapper;
import com.icinfo.cloud.provider.punish.service.ICasePartiesPersonInfoService;
import com.icinfo.cloud.provider.punish.ucase.casemain.model.CasePartiesPersonInfo;
import com.icinfo.framework.core.service.support.MyBatisServiceSupport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 案件当事人个人信息表 case_parties_person_info 对应的Service实现类
 * author: Kexin.Hu
 * date: 2024/3/18 14:02
 */
@Service
@Slf4j
public class CasePartiesPersonInfoServiceImpl extends MyBatisServiceSupport implements ICasePartiesPersonInfoService {

    @Resource
    private CasePartiesPersonInfoMapper casePartiesPersonInfoMapper;


    @Override
    public CasePartiesPersonInfo getCasePartiesPersonInfoById(String id) {
        if (StrUtil.isBlank(id)) {
            throw new BusinessException("个人当事人id不能为空！");
        }
        return casePartiesPersonInfoMapper.selectByPrimaryKey(id);
    }
}
